#!/usr/local/bin/perl
package CV;
use strict; use warnings;
use feature qw/say/;

use imv_ft;

sub convert
{
#    my ($ft,$fn,$odir,$opt,undef) = @_;
    (my $fout=$_[1])=~tr/\//./;
    $fout=~s/^\.//;
    my $f="$_[2]/$fout";
    $fout=$f."%%d.png";
    my @cf;
    my $com=&FT::get_com($_[0],"%f"=>$_[1],"%o"=>$fout,"%u"=>$_[3]);
    unless(defined($com)){
	say "#ERR:INTERNAL ERROR for FT=$_[0], FN=$_[1], ODIR=$_[2], EXTOPT=$_[3]";
	exit 1;
    }
    my $rc=system($com);
    say "#ERR:Command failed: $com" if $rc!=0;
    return $rc;
}

1;
